<template>
  <div>
    <!-- 2.轮播 -->
    <!-- <van-sticky :offset-top="30"> -->
    <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
      <van-swipe-item v-for="(image, index) in images" :key="index">
        <img v-lazy="image" class="imgSize" />
      </van-swipe-item>
    </van-swipe>
    <!-- </van-sticky> -->
  </div>
</template>
<script>
export default {
  data() {
    return {
      images: [
        "https://img01.yzcdn.cn/vant/apple-1.jpg",
        "https://img01.yzcdn.cn/vant/apple-2.jpg",
        "https://img01.yzcdn.cn/vant/apple-3.jpg",
        "https://img01.yzcdn.cn/vant/apple-4.jpg",
      ],
    };
  },
};
</script>
<style lang="scss" scoped>
// 轮播
.my-swipe .van-swipe-item {
  color: #fff;
  font-size: 20px;
  line-height: 150px;
  text-align: center;
  background-color: #39a9ed;
  width: 100%;
  height: 150px;
  .imgSize {
    width: 100%;
    height: 150px;
    background-size: 100% 100%;
  }
}
</style>